package com.yugao.fintech.antelope.member.service;

import com.yugao.fintech.antelope.member.MemberApi;
import com.yugao.fintech.antelope.member.assembly.MemberUserAssembly;
import com.yugao.fintech.antelope.member.model.rqrs.user.MemberUserRegisterReq;
import com.yugao.fintech.antelope.member.model.rqrs.user.MemberUserResp;
import com.yugao.fintech.antelope.member.model.rqrs.user.MemberUserUpdateReq;
import org.springframework.stereotype.Service;


@Service
public class MemberApiImpl implements MemberApi {
    @Autowired
    private MemberUserAssembly userAssembly;
    @Autowired
    private MemberUserService memberUserService;

    @Override
    public MemberUserResp registerUserIfAbsent(MemberUserRegisterReq req) {
        return userAssembly.toUserResp(memberUserService.registerUserIfAbsent(req));
    }

    @Override
    public void updateUser(MemberUserUpdateReq req) {
        memberUserService.updateUser(req);
    }
}
